/**
 * 
 */
package com.yishuki.bluewhale.db.entity;

import java.io.Serializable;

import javax.persistence.Column;

/**
 * @author yhzhu
 *
 */
public class CategoryProductionPK implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1220690677416899031L;

	@Column(name="CATEGORY_ID")
	private Long categoryId;
	
	@Column(name="PRODUCTION_ID")
	private Long productionId;

	public Long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public Long getProductionId() {
		return productionId;
	}

	public void setProductionId(Long productionId) {
		this.productionId = productionId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((categoryId == null) ? 0 : categoryId.hashCode());
		result = prime * result
				+ ((productionId == null) ? 0 : productionId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CategoryProductionPK other = (CategoryProductionPK) obj;
		if (categoryId == null) {
			if (other.categoryId != null)
				return false;
		} else if (!categoryId.equals(other.categoryId))
			return false;
		if (productionId == null) {
			if (other.productionId != null)
				return false;
		} else if (!productionId.equals(other.productionId))
			return false;
		return true;
	}
	
	
}
